﻿<%@ Page Title="" Language="C#" MasterPageFile="~/BaseInfoMaster.master" AutoEventWireup="true"
    CodeFile="LossCustomers.aspx.cs" Inherits="AnalysisReport_LossCustomers" %>

<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="Server">
    <link type="text/css" rel="stylesheet" href="../Content/Site.css" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <h1 class="DemoTitle">
        流失客户查询
    </h1>
    <div id="DemoArea">
        <div class="Spacer" style="height: 14px;">
        </div>
        <table runat="server" id="QueryTable">
            <tr>
                <td>
                    <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="未消费时间段：" Font-Size="10pt" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                        CssPostfix="DevEx">
                    </dx:ASPxLabel>
                </td>
                <td>
                    <dx:ASPxComboBox ID="Query_Date" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                        CssPostfix="DevEx" Font-Size="10pt" SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css"
                        Width="170px">
                        <Items>
                            <dx:ListEditItem Text="一个月以下" Value="0" Selected="true" />
                            <dx:ListEditItem Text="三个月以下" Value="1" />
                            <dx:ListEditItem Text="半年以下" Value="2" />
                            <dx:ListEditItem Text="一年以下" Value="3" />
                            <dx:ListEditItem Text="一年以上" Value="4" />
                        </Items>
                    </dx:ASPxComboBox>
                </td>
                <td style="padding-left: 5px">
                    <dx:ASPxButton ID="btnQuery" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                        CssPostfix="DevEx" Font-Size="10pt" SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css"
                        Text="查询" AutoPostBack="False" UseSubmitBehavior="False">
                        <ClientSideEvents Click="function(s,e){QueryPanel.PerformCallback(); }" />
                    </dx:ASPxButton>
                </td>
            </tr>
        </table>
        注：重要客户的行颜色为红色
        <dx:ASPxCallbackPanel ID="QueryCBPanel" ClientInstanceName="QueryPanel" runat="server"
            CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" OnCallback="QueryCBPanel_Callback">
            <LoadingPanelImage Url="~/App_Themes/DevEx/Web/Loading.gif">
            </LoadingPanelImage>
            <LoadingPanelStyle ImageSpacing="5px">
            </LoadingPanelStyle>
            <PanelCollection>
                <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                    <dx:ASPxGridView ID="gridView" runat="server" Width="100%" AutoGenerateColumns="False"
                        KeyFieldName="ConsumerID" CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx"
                        OnHtmlRowPrepared="gridView_HtmlRowPrepared">
                        <Styles CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx">
                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                            </Header>
                            <LoadingPanel ImageSpacing="5px">
                            </LoadingPanel>
                        </Styles>
                        <ImagesFilterControl>
                            <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                            </LoadingPanel>
                        </ImagesFilterControl>
                        <Images SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css">
                            <LoadingPanelOnStatusBar Url="~/App_Themes/DevEx/GridView/StatusBarLoading.gif">
                            </LoadingPanelOnStatusBar>
                            <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                            </LoadingPanel>
                        </Images>
                        <Columns>
                            <dx:GridViewDataTextColumn Name="t_ConsumerID" FieldName="ConsumerID" VisibleIndex="0"
                                CellStyle-HorizontalAlign="Right" ReadOnly="true" Caption="自动编码">
                                <CellStyle HorizontalAlign="Right">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Name="t_CName" FieldName="CName" VisibleIndex="1" CellStyle-HorizontalAlign="Left"
                                Caption="客户姓名">
                                <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                                <CellStyle HorizontalAlign="Left">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Name="t_PhoneNum" FieldName="PhoneNum" VisibleIndex="2"
                                CellStyle-HorizontalAlign="Left" Caption="电话号码">
                                <PropertiesTextEdit MaxLength="50" Native="true" Width="260px">
                                </PropertiesTextEdit>
                                <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                                <CellStyle HorizontalAlign="Left">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Name="t_Position" FieldName="Position" VisibleIndex="3"
                                CellStyle-HorizontalAlign="Left" Caption="头衔">
                                <CellStyle HorizontalAlign="Left">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Name="t_Company" FieldName="Company" VisibleIndex="4"
                                CellStyle-HorizontalAlign="Left" Caption="就职单位">
                                <PropertiesTextEdit MaxLength="100" Native="true" Width="260px">
                                </PropertiesTextEdit>
                                <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                                <CellStyle HorizontalAlign="Left">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Name="t_Address" FieldName="Address" VisibleIndex="6"
                                Visible="false" CellStyle-HorizontalAlign="Left" Caption="地址">
                                <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                                <CellStyle HorizontalAlign="Left">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataMemoColumn Name="t_Remark" FieldName="Remark" VisibleIndex="7" CellStyle-HorizontalAlign="Left"
                                Visible="false" Caption="备注">
                                <CellStyle HorizontalAlign="Left">
                                </CellStyle>
                            </dx:GridViewDataMemoColumn>
                            <dx:GridViewDataMemoColumn Name="t_PhoneRemark" FieldName="PhoneRemark" VisibleIndex="7"
                                CellStyle-HorizontalAlign="Left" Visible="false" Caption="备注">
                                <CellStyle HorizontalAlign="Left">
                                </CellStyle>
                            </dx:GridViewDataMemoColumn>
                            <dx:GridViewDataTextColumn Name="t_Department" FieldName="Department" VisibleIndex="8"
                                Visible="false" CellStyle-HorizontalAlign="Left" Caption="部门">
                                <CellStyle HorizontalAlign="Left">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataComboBoxColumn Name="t_Sex" FieldName="Sex" VisibleIndex="9" CellStyle-HorizontalAlign="Right"
                                Caption="性别">
                                <PropertiesComboBox>
                                    <Items>
                                        <dx:ListEditItem Text="男" Value="1" />
                                        <dx:ListEditItem Text="女" Value="0" />
                                    </Items>
                                </PropertiesComboBox>
                                <CellStyle HorizontalAlign="Right">
                                </CellStyle>
                            </dx:GridViewDataComboBoxColumn>
                            <dx:GridViewDataTextColumn Name="t_Car" FieldName="Car" VisibleIndex="10" CellStyle-HorizontalAlign="Left"
                                Visible="false" Caption="车牌/车名/颜色">
                                <CellStyle HorizontalAlign="Left">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataMemoColumn Name="t_Favor" FieldName="Favor" VisibleIndex="11" CellStyle-HorizontalAlign="Left"
                                Visible="false" Caption="喜好，口味">
                                <CellStyle HorizontalAlign="Left">
                                </CellStyle>
                            </dx:GridViewDataMemoColumn>
                            <dx:GridViewDataComboBoxColumn Name="t_IsVip" FieldName="IsVip" VisibleIndex="12"
                                CellStyle-HorizontalAlign="Right" Caption="重要客户">
                                <PropertiesComboBox>
                                    <Items>
                                        <dx:ListEditItem Text="是" Value="1" />
                                        <dx:ListEditItem Text="否" Value="0" />
                                    </Items>
                                </PropertiesComboBox>
                                <CellStyle HorizontalAlign="Right">
                                </CellStyle>
                            </dx:GridViewDataComboBoxColumn>
                            <dx:GridViewDataComboBoxColumn Name="t_RefrenceCompany_ID" FieldName="RefrenceCompany_ID"
                                VisibleIndex="13" CellStyle-HorizontalAlign="Center" Caption="关联单位">
                                <PropertiesComboBox NullDisplayText="无">
                                </PropertiesComboBox>
                                <CellStyle HorizontalAlign="Center">
                                </CellStyle>
                            </dx:GridViewDataComboBoxColumn>
                            <dx:GridViewDataTextColumn Name="t_ConsumerDate" FieldName="ConsumerDate" VisibleIndex="14"
                                CellStyle-HorizontalAlign="Center" Caption="上次消费时间">
                                <CellStyle HorizontalAlign="Center">
                                </CellStyle>
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <Templates>
                            <DetailRow>
                                <table style="font-size: 10pt" width="600px">
                                    <tr>
                                        <td style="white-space: nowrap">
                                            部门:
                                        </td>
                                        <td>
                                            <dx:ASPxLabel Width="200px" Font-Size="10pt" ID="View_Department" Wrap="true" runat="server"
                                                CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("Department") %>'
                                                CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                        <td style="white-space: nowrap">
                                            车牌/车名/颜色:
                                        </td>
                                        <td>
                                            <dx:ASPxLabel Width="200px" Font-Size="10pt" ID="View_Car" Wrap="true" runat="server"
                                                CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("Car") %>' CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="white-space: nowrap;">
                                            单位名称:
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxLabel Width="400px" Font-Size="10pt" ID="View_Company" Wrap="true" runat="server"
                                                CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("Company") %>'
                                                CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="white-space: nowrap">
                                            地址:
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxLabel Width="400px" ID="View_Address" Font-Size="10pt" Wrap="true" runat="server"
                                                CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("Address") %>'
                                                CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="white-space: nowrap">
                                            喜好，口味:
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxLabel Width="400px" ID="View_Favor" Wrap="true" Font-Size="10pt" runat="server"
                                                CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("Favor") %>' CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="white-space: nowrap">
                                            备注电话号码:
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxLabel Width="400px" ID="ASPxLabel1" Wrap="true" Font-Size="10pt" runat="server"
                                                CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("PhoneRemark") %>'
                                                CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="white-space: nowrap">
                                            备注:
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxLabel Width="400px" ID="View_Remark" Wrap="true" Font-Size="10pt" runat="server"
                                                CssFilePath="~/App_Themes/DevEx/{0}/styles.css" Text='<%# Eval("Remark") %>'
                                                CssPostfix="DevEx">
                                            </dx:ASPxLabel>
                                        </td>
                                    </tr>
                                </table>
                            </DetailRow>
                        </Templates>
                        <SettingsDetail AllowOnlyOneMasterRowExpanded="true" ShowDetailRow="true" ShowDetailButtons="true" />
                        <StylesEditors ButtonEditCellSpacing="0">
                            <ProgressBar Height="21px">
                            </ProgressBar>
                        </StylesEditors>
                        <SettingsEditing EditFormColumnCount="1" />
                    </dx:ASPxGridView>
                </dx:PanelContent>
            </PanelCollection>
        </dx:ASPxCallbackPanel>
    </div>
</asp:Content>
